<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <base href="/" />
    <link rel="stylesheet" type="text/css" href="/css/shoppingCart.css" />
    <link rel="stylesheet" type="text/css" href="css/reset.css" />
    <title>Document</title>
  </head>
  <body>
    <header></header>
    <div id="cart">
      <div class="cart_list" id="cart_list">
        <script type="text/html" id="shoppingList">
          <table cellspacing="0" cellpadding="0">
            <thead>
              <tr>
                <th>
                  <a href="javascript:;" id="edit">选择</a>
                  <input type="checkbox" id="all-check" />
                </th>
                <th>商品名称</th>
                <th>原价</th>
                <th> 数量</th>
                <th>单价</th>
                <th>小计</th>
              </tr>
            </thead>
            <tbody>
              {{ each info item}}
              <tr data-id = "{{item.id}}">
                <td>
                  <label class="check-label">
                    <input type="checkbox" {{item.check ? "checked" : ""}} class="checks" />
                    <span class="check-span">
                      <span class="check-item"></span>
                    </span>
                  </label>
                </td>
                <td>
                  <a href="/html/details.html">
                    <img src="{{item.imgUrl}}"alt="" />
                  </a>
                  <span>{{item.title}}</span>
                </td>
                <td>
                  <span>{{item.originPrice}}</span>
                </td>
                <td>
                  <button class="minus">-</button>
                  <input type="text" value="{{item.count}}" />
                  <button class="plus">+</button>
                </td>
                <td>
                  {{item.price}}
                </td>
                <td>
                  {{(item.price * item.count).toFixed(2)}}
                </td>
              </tr>
              {{/each}}
            </tbody>
          </table>
          <div class="jiesuan">
            <i>¥:</i>
            <span id="zongjia"></span>
            <a href="javascript">立即结算</a>
          </div>
        </script>
      </div>
    </div>
    <footer></footer>
  </body>
  <script src="/lib/require.min.js" data-main="/js/shoppingCart.js"></script>
</html>
